package com.xinqi.modules.prepare.homework.service;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.Param;
import com.xinqi.modules.prepare.common.dto.data.PrepareHomeworkData;
import com.xinqi.modules.prepare.homework.dto.req.PrepareHomeworkCreateDTO;
import com.xinqi.modules.prepare.homework.dto.req.PrepareHomeworkDeleteDTO;
import com.xinqi.modules.prepare.homework.dto.req.PrepareHomeworkQueryDTO;
import com.xinqi.modules.prepare.homework.dto.req.PrepareHomeworkUpdateDTO;
import com.xinqi.modules.prepare.homework.dto.rsp.PrepareHomeworkResultDTO;

import javax.validation.Valid;
import java.util.List;

/**
 * 备课区作业服务层
 *
 * @author: system
 * @date: 2023/03/19
 */
public interface PrepareHomeworkService {
    /**
     * 分页查询 备课区作业数据
     */
    PageInfo<PrepareHomeworkResultDTO> page(Param pageable, PrepareHomeworkQueryDTO query);

    /**
     * 查询 备课区作业数据
     */
    List<PrepareHomeworkResultDTO> find(PrepareHomeworkQueryDTO query);

    /**
     * 根据id查询 备课区作业数据
     */
    PrepareHomeworkResultDTO findById(Long id);

    /**
     * 根据id查询 备课区作业数据导出
     */
    PrepareHomeworkData find(Long id);

    /**
     * 新增 备课区作业数据
     */
    Long insert(@Valid PrepareHomeworkCreateDTO dto);

    /**
     * 导入 备课区作业数据
     */
    Long insert(@Valid PrepareHomeworkData dto);

    /**
     * 根据id修改 备课区作业数据
     */
    Boolean updateById(@Valid PrepareHomeworkUpdateDTO dto);

    /**
     * 根据id删除 备课区作业数据
     */
    Boolean deleteById(Long id);

    /**
     * 根据id删除 备课区作业数据
     */
    Boolean deleteById(PrepareHomeworkDeleteDTO dto);
}
